package com.utc.cards.player.jade.agent.playerAgent;

import jade.core.AID;
import jade.core.behaviours.OneShotBehaviour;
import jade.lang.acl.ACLMessage;

import com.utc.cards.Constants;
import com.utc.cards.model.game.Info;
import com.utc.cards.model.game.InfoType;

public class PlayerReadyBehaviour extends OneShotBehaviour
{

    /**
     * 
     */
    private static final long serialVersionUID = 1069544529325475573L;

    public PlayerReadyBehaviour(PlayerAgent playerAgent)
    {
        super(playerAgent);
    }

    @Override
    public void action()
    {
        Info info = new Info();
        info.setType(InfoType.PLAYER_READY);
        ACLMessage message = new ACLMessage(ACLMessage.INFORM);
        message.addReceiver(new AID(Constants.CARDS_HOST_GAME_AGENT_NAME, AID.ISLOCALNAME));
        message.setConversationId("ready");
        myAgent.send(message);

    }

}
